package com.yxw.live_vod_backend_boot.controller;


import com.yxw.live_vod_backend_boot.dto.NoticeTypeUpdateDto;
import com.yxw.live_vod_backend_boot.dto.menu.MenuQueryDTO;
import com.yxw.live_vod_backend_boot.service.NoticeTypeService;
import com.yxw.live_vod_backend_boot.service.VodBackendService;
import com.yxw.live_vod_backend_boot.vo.YxCsMenuVo;
import com.yxw.live_vod_backend_facade.dto.NoticeTypeQueryDto;
import com.yxw.live_vod_backend_facade.vo.NoticeTypeVo;
import com.yxw.live_vod_facade.dto.*;
import com.yxw.live_vod_facade.vo.OnDemandCommentVO;
import com.yxw.live_vod_facade.vo.PageVodInfoListVO;
import com.yxw.live_vod_facade.vo.VideoReviewVO;
import com.yxw.yxnet_cd_center.common.dto.PageVO;
import com.yxw.yxnet_cd_center.common.utils.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * @author liuxin
 * @create 2023-12-06
 * @description 系统消息通知类型管理
 */
@RestController
@Api(value = "系统消息通知类型管理", tags = "系统消息通知类型管理")
@Slf4j
@RequestMapping("/api/backend/noticeType")
public class NoticeTypeController {

    @Autowired
    private NoticeTypeService noticeTypeService;

    @PostMapping("/pageNoticeTypeList")
    @ApiOperation(value = "查询消息通知类型列表")
    public BaseResult<PageVO<NoticeTypeVo>> pageNoticeTypeList(@RequestBody NoticeTypeQueryDto dto) {
        PageVO<NoticeTypeVo>  pageVO= noticeTypeService.pageNoticeTypeList(dto);
        return BaseResult.doSuccess(pageVO,"查询成功！");
    }

    @PostMapping("/updateNoticeTypeById")
    @ApiOperation(value = "更新通知类型内容和状态")
    public BaseResult updateNoticeTypeById(@RequestBody NoticeTypeUpdateDto dto) {
        noticeTypeService.updateNoticeTypeById(dto);
        return BaseResult.doSuccess(null,"更新成功！");
    }
}
